import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)


const routes = [{
    path: "/",
    component: () => import('@/layout/index.vue'),
    redirect:'/home',
    children: [
        {
        path: 'home',
        component:()=>import('@/views/home/index.vue')
        },
        {
        path: 'housewifery',
        component:()=>import('@/views/housewifery/index.vue')
        },
        {
        path: 'my',
        component:()=>import('@/views/my/index.vue')   
        },
        {
        path: 'support',
        component:()=>import('@/views/support/index.vue')    
        }
    ]
},
    {
    path: '/login',
    component:()=>import('@/views/login/index.vue')   
    },
    {
    path: '/404',
    component:()=>import('@/views/404/index.vue')
    },
    {
    path: '*',
    redirect:"/404",  
    }

]

const router = new VueRouter({
    routes
})


export default router